// 16
package main

import (
	"fmt"
)

func main() {
	fmt.Println(multiple(1000))
}
func multiple(n int) int {
	s := make([]int, 1)
	s[0] = 1
	for i := 0; i < n; i++ {
		for j := 0; j < len(s); j++ {
			s[j] *= 2
		}
		for j := 0; j < len(s); j++ {
			if s[j] >= 1e10 {
				if j+1 < len(s) {
					s[j+1] += s[j] / 1e10
				} else {
					s = append(s, s[j]/1e10)
				}
				s[j] %= 1e10
			}
		}
	}
	ss := 0
	for i := 0; i < len(s); i++ {
		for s[i] > 0 {
			ss += s[i] % 10
			s[i] /= 10
		}
	}
	return ss
}
